﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LIMS.BLL
{
    public class TeacherManager
    {
        private static LIMS.IDAL.ITeacher teacher = LIMS.DALFactory.DataAccessFactory<LIMS.IDAL.ITeacher>.CreateTeacher();

        public static Boolean AddTeacher(LIMS.Model.Teachers tea)
        {
            return teacher.Add(tea);
        }

        public static List<Model.Teachers> GetAllTeacher()
        {
            return teacher.FindAll();
        }

        public static List<Model.Teachers> SearchByName(String teacherName)
        {
            return teacher.FindByName(teacherName);
        }

        public static Boolean UpdateTeacherData(LIMS.Model.Teachers tea)
        {
            return teacher.Modify(tea);
        }

        public static Boolean DeleteTeacher(LIMS.Model.Teachers tea)
        {
            return teacher.Remove(tea);
        }

        public static String GetNameByID(String teaID)
        {
            return teacher.FindName(teaID);
        }

        public static LIMS.Model.Teachers GetTeacherByID(String teaID)
        {
            return teacher.FindByID(teaID);
        }

    }
}
